from ronglian_sms_sdk import SmsSDK
import json
accId = '2c94811c936de29c019370513974001c'
accToken = 'd4c4b6cec4474c3ea7e84cd67c6b64d6'
appId = '2c94811c936de29c01937058cafe0075'
# 通过运营商来发送验证码
def send_message(phone,code):
    sdk = SmsSDK(accId, accToken, appId)
    tid = '1'
    mobile =phone
    datas = (code,)
    resp = json.loads(sdk.sendMessage(tid, mobile, datas))
    print(resp)
    # ??
    if resp['statusCode']=='000000':
        return True
    else:
        return False
#     print(resp)
# send_message('15039296797','1234')